#ifndef GAME_H
#define GAME_H

#include <QMainWindow>
#include <QWidget>
#include <QVector>
#include <grid.h>
class game : public QMainWindow
{
    Q_OBJECT
public:
    explicit game(QWidget *parent = nullptr,int length = 0,int width = 0,int num = 0);
    grid * minemap[40][40];
    int dx[8] = {1,1,1,-1,-1,-1,0,0};
    int dy[8] = {1,0,-1,1,0,-1,1,-1};
    void dfs(int x,int y,int length,int width);
    bool isWin(int length,int width);
    bool infield(int x,int y,int length,int width);
    void clickall(int x,int y,int length,int width,int num);
signals:
    void Backtomenu();

public slots:
};

#endif // GAME_H
